package zjut.cocouml.wizard.page;

import static zjut.cocouml.constant.DialogStrings.*;
import static zjut.cocouml.wizard.ElementWizardSettings.*;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;

import zjut.cocouml.wizard.ElementWizardSettings;

public class ModifyAttributeWizardPage extends MemberSignatureWizardPage{

	public ModifyAttributeWizardPage(String name,boolean isInterface) {
		super(name);
		setTitle(WIZARD_ADD_FIELD_TITLE);
		setDescription(WIZARD_ADD_FIELD_MESSAGE);
		this.setInterface(isInterface);
	}
	
	public void createControl(Composite parent) {
		super.createControl(parent);
		this.setTypeLabel(WIZARD_ADD_FIELD_TYPE);
	}
	
	protected boolean allowVoidType() {
		return false;
	}

	@Override
	protected ElementWizardSettings getSetting() {
		
		System.out.println("ModifyAttributeWizardPage : ElementWizardSettings : getSetting : isInterface = " +isInterface());
		System.out.println("ModifyAttributeWizardPage : ElementWizardSettings : getSetting : isInterface = " +isInterface());
		return isInterface() ? InterfaceFieldSettings : ClassFieldSettings;
	}

	@Override
	protected boolean isField() {
		return true;
	}

}
